home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 66
/
Vol 66.iso
/
games
/
apple_gi.swf
/
scripts
/
DefineSprite_574
/
frame_1
/
DoAction.as
Wrap
Text File
|
2013-04-24
|
2KB
|
96 lines
function loadData(arg)
{
resetField();
var _loc2_ = new LoadVars();
var _loc3_ = new LoadVars();
_loc3_.onLoad = function(s)
{
if(s)
{
if(Number(this.rsCnt == 0))
{
msg_mc.msg_txt.text = "데이터가 없습니다.";
msg_mc._visible = true;
}
else
{
rankingData = this;
setData();
}
}
else
{
msg_mc.msg_txt.text = "서버 응답이 없습니다.";
msg_mc._visible = true;
}
};
if(arg == "today")
{
menu_mc.prevFrame();
}
else
{
menu_mc.nextFrame();
}
msg_mc.msg_txt.text = "데이터 로딩...";
msg_mc._visible = true;
_loc2_.game_id = game_id;
_loc2_.loadType = arg;
_loc2_.sendAndLoad(baseURL + sScript1,_loc3_,"post");
}
function sendData()
{
var _loc1_ = new LoadVars();
var _loc2_ = new LoadVars();
_loc2_.onLoad = function(s)
{
if(s)
{
loadData("today");
}
};
msg_mc.msg_txt.text = "데이터 입력...";
msg_mc._visible = true;
_loc1_.game_id = game_id;
_loc1_.score = score;
_loc1_.sendAndLoad(baseURL + sScript2,_loc2_,"post");
}
function resetField()
{
myRank.text = "";
myScore.text = "";
var _loc2_ = 0;
while(_loc2_ < 10)
{
this["user_id" + _loc2_].text = "";
this["score" + _loc2_].text = "";
this["date" + _loc2_].text = "";
_loc2_ = _loc2_ + 1;
}
}
function setData()
{
msg_mc.msg_txt.text = "";
msg_mc._visible = false;
myRank.text = rankingData.myrank;
myScore.text = rankingData.myscore;
var _loc2_ = 0;
while(_loc2_ < 10)
{
if(rankingData["id" + _loc2_] != null)
{
this["user_id" + _loc2_].text = rankingData["id" + _loc2_];
this["score" + _loc2_].text = rankingData["score" + _loc2_];
this["date" + _loc2_].text = rankingData["date" + _loc2_];
}
_loc2_ = _loc2_ + 1;
}
}
stop();
var baseURL = _parent.baseURL;
var sScript1 = _parent.sScript1;
var sScript2 = _parent.sScript2;
var game_id = _parent.game_id;
var isLogin = Number(_parent.isLogin);
var rankingData = new Object();